Optimal. Leaf size=175 \[ \frac{2^{\frac{1}{2}-\frac{p}{2}} \sec (e+f x) (1-\sin (e+f x))^{\frac{p+1}{2}} (a \sin (e+f x)+a)^{m+1} (g \sec (e+f x))^p (c+d \sin (e+f x))^n \left (\frac{c+d \sin (e+f x)}{c-d}\right )^{-n} F_1\left (\frac{1}{2} (2 m-p+1);\frac{p+1}{2},-n;\frac{1}{2} (2 m-p+3);\frac{1}{2} (\sin (e+f x)+1),-\frac{d (\sin (e+f x)+1)}{c-d}\right )}{a f (2 m-p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.429306, antiderivative size = 175, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2926, 2921, 140, 139, 138} \[ \frac{2^{\frac{1}{2}-\frac{p}{2}} \sec (e+f x) (1-\sin (e+f x))^{\frac{p+1}{2}} (a \sin (e+f x)+a)^{m+1} (g \sec (e+f x))^p (c+d \sin (e+f x))^n \left (\frac{c+d \sin (e+f x)}{c-d}\right )^{-n} F_1\left (\frac{1}{2} (2 m-p+1);\frac{p+1}{2},-n;\frac{1}{2} (2 m-p+3);\frac{1}{2} (\sin (e+f x)+1),-\frac{d (\sin (e+f x)+1)}{c-d}\right )}{a f (2 m-p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2926
Rule 2921
Rule 140
Rule 139
Rule 138
Rubi steps
\begin{align*} \int (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c+d \sin (e+f x))^n \, dx &=\left ((g \cos (e+f x))^p (g \sec (e+f x))^p\right ) \int (g \cos (e+f x))^{-p} (a+a \sin (e+f x))^m (c+d \sin (e+f x))^n \, dx\\ &=\frac{\left (\sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{\frac{1+p}{2}} (a+a \sin (e+f x))^{\frac{1+p}{2}}\right ) \operatorname{Subst}\left (\int (a-a x)^{\frac{1}{2} (-1-p)} (a+a x)^{m+\frac{1}{2} (-1-p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (2^{-\frac{1}{2}-\frac{p}{2}} \sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{-\frac{1}{2}-\frac{p}{2}+\frac{1+p}{2}} \left (\frac{a-a \sin (e+f x)}{a}\right )^{\frac{1}{2}+\frac{p}{2}} (a+a \sin (e+f x))^{\frac{1+p}{2}}\right ) \operatorname{Subst}\left (\int \left (\frac{1}{2}-\frac{x}{2}\right )^{\frac{1}{2} (-1-p)} (a+a x)^{m+\frac{1}{2} (-1-p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (2^{-\frac{1}{2}-\frac{p}{2}} \sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{-\frac{1}{2}-\frac{p}{2}+\frac{1+p}{2}} \left (\frac{a-a \sin (e+f x)}{a}\right )^{\frac{1}{2}+\frac{p}{2}} (a+a \sin (e+f x))^{\frac{1+p}{2}} (c+d \sin (e+f x))^n \left (\frac{a (c+d \sin (e+f x))}{a c-a d}\right )^{-n}\right ) \operatorname{Subst}\left (\int \left (\frac{1}{2}-\frac{x}{2}\right )^{\frac{1}{2} (-1-p)} (a+a x)^{m+\frac{1}{2} (-1-p)} \left (\frac{a c}{a c-a d}+\frac{a d x}{a c-a d}\right )^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{2^{\frac{1}{2}-\frac{p}{2}} F_1\left (\frac{1}{2} (1+2 m-p);\frac{1+p}{2},-n;\frac{1}{2} (3+2 m-p);\frac{1}{2} (1+\sin (e+f x)),-\frac{d (1+\sin (e+f x))}{c-d}\right ) \sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac{1+p}{2}} (a+a \sin (e+f x))^{1+m} (c+d \sin (e+f x))^n \left (\frac{c+d \sin (e+f x)}{c-d}\right )^{-n}}{a f (1+2 m-p)}\\ \end{align*}
Mathematica [B] time = 9.43978, size = 852, normalized size = 4.87 \[ \frac{2 F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right ) \cos \left (\frac{1}{4} (2 e+2 f x+\pi )\right ) (g \sec (e+f x))^p (a (\sin (e+f x)+1))^m (c+d \sin (e+f x))^n \sin \left (\frac{1}{4} (2 e+2 f x+\pi )\right )}{f \left (\frac{d n F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right ) \cos ^2(e+f x)}{c+d \sin (e+f x)}+\frac{2 (1-p) \left ((m+n-p+1) F_1\left (\frac{3-p}{2};m+n-p+2,-n;\frac{5-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right )-\frac{(c-d) n F_1\left (\frac{3-p}{2};m+n-p+1,1-n;\frac{5-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right )}{c+d}\right ) \cot ^2\left (\frac{1}{4} (2 e+2 f x+\pi )\right )}{3-p}-2 (n-p) F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right ) \sin ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )+\frac{2 (c-d) n F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right ) \sin ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d \sin (e+f x)}-F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right )+p F_1\left (\frac{1-p}{2};m+n-p+1,-n;\frac{3-p}{2};-\tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right ),-\frac{(c-d) \tan ^2\left (\frac{1}{4} (2 e+2 f x-\pi )\right )}{c+d}\right ) \sin (e+f x)\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 2.746, size = 0, normalized size = 0. \begin{align*} \int \left ( g\sec \left ( fx+e \right ) \right ) ^{p} \left ( a+a\sin \left ( fx+e \right ) \right ) ^{m} \left ( c+d\sin \left ( fx+e \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (g \sec \left (f x + e\right )\right )^{p}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (d \sin \left (f x + e\right ) + c\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\left (g \sec \left (f x + e\right )\right )^{p}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (d \sin \left (f x + e\right ) + c\right )}^{n}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (g \sec \left (f x + e\right )\right )^{p}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (d \sin \left (f x + e\right ) + c\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]